<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改渠道管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-channel-edit" th:object="${hzChaChannel}">
            <input name="channelId" th:field="*{channelId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">渠道名称：</label>
                <div class="col-sm-8">
                    <input name="channelName" th:field="*{channelName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">渠道编码：</label>
                <div class="col-sm-8">
                    <input name="channelCode" th:field="*{channelCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">·
                <label class="col-sm-3 control-label">渠道服务地址：</label>
                <div class="col-sm-8">
                    <textarea name="serverUrl" class="form-control">[[*{serverUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">渠道商户号：</label>
                <div class="col-sm-8">
                    <input name="chaMerId" th:field="*{chaMerId}" class="form-control" type="text" placeholder="渠道给平台分配的商户号">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">渠道给平台分配的密钥值：</label>
                <div class="col-sm-8">
                    <textarea name="chaKey" class="form-control">[[*{chaKey}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">平台给渠道分配的密钥值：</label>
                <div class="col-sm-8">
                    <textarea name="plaKey" class="form-control">[[*{plaKey}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">渠道分配给平台的证书文件地址：</label>
                <div class="col-sm-8">
                    <textarea name="chaKeyUrl" class="form-control">[[*{chaKeyUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">平台分配给渠道的证书文件地址：</label>
                <div class="col-sm-8">
                    <textarea name="plaKeyUrl" class="form-control">[[*{plaKeyUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">渠道分配给平台的证书文件密码：</label>
                <div class="col-sm-8">
                    <textarea name="chaKeyPwd" class="form-control">[[*{chaKeyPwd}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">平台分配给渠道的证书文件密码：</label>
                <div class="col-sm-8">
                    <textarea name="plaKeyPwd" class="form-control">[[*{plaKeyPwd}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">平台异步通知地址：</label>
                <div class="col-sm-8">
                    <textarea name="notifyUrl" class="form-control">[[*{notifyUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">平台同步跳转地址：</label>
                <div class="col-sm-8">
                    <textarea name="returnUrl" class="form-control">[[*{returnUrl}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注1：</label>
                <div class="col-sm-8">
                    <input name="remark1" th:field="*{remark1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注2：</label>
                <div class="col-sm-8">
                    <input name="remark2" th:field="*{remark2}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注3：</label>
                <div class="col-sm-8">
                    <input name="remark3" th:field="*{remark3}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">启用状态：</label>
                <div class="col-sm-8">
                    <select th:field="*{status}" th:value="*{status}" name="status" class="form-control">
                        <option th:selected="*{status==1}" value="1">启用</option>
                        <option th:selected="*{status==2}" value="2">暂停</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "mng/channel";
        $("#form-channel-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-channel-edit').serialize());
            }
        }
    </script>
</body>
</html>